using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace XiaoMan.Model.Models.Mapping
{
    public class Sys_GradeMap : EntityTypeConfiguration<Sys_Grade>
    {
        public Sys_GradeMap()
        {
            // Primary Key
            this.HasKey(t => t.GradeID);

            // Properties
            this.Property(t => t.GradeName)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Sys_Grade");
            this.Property(t => t.GradeID).HasColumnName("GradeID");
            this.Property(t => t.GradeOrder).HasColumnName("GradeOrder");
            this.Property(t => t.GradeName).HasColumnName("GradeName");
        }
    }
}
